package com.wingscode.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.wingscode.common.validator.group.AddGroup;
import com.wingscode.common.validator.group.UpdateGroup;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 资质
 *
 * @author yan
 */
@Data
@TableName("build_qual")
public class BuildQualEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId
	private Integer id;

	/**
	 * 资质类型id
	 */
	@TableField("name_id")
	@NotNull(message="nameId不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private Integer nameId;

	/**
	 * 等级id
	 */
	@NotNull(message="grade不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private Integer grade;

	/**
	 * 技术负责人人数
	 */
	private Integer technology;

	/**
	 * 建造师人数
	 */
	private Integer architect;

	/**
	 * 中级以上职称人员人数
	 */
	@TableField("middle_over")
	private Integer middleOver;

	/**
	 * 现场管理人员人数
	 */
	private Integer manager;

	/**
	 * 中级工人数
	 */
	private Integer middle;

	/**
	 * 备注字段
	 */
	private String reserve;

	/**
	 * 创建时间
	 */
	@TableField("create_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
	private Date createTime;

	@TableField("update_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
	private Date updateTime;

	/**
	 * 资质分类id
	 */
	@TableField("qual_type")
	@NotNull(message="qualType不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private Integer qualType;

	/**
	 * 最低企业净资产
	 */
	@TableField("net_assets")
	private String netAssets;

	/**
	 * 承包工程范围
	 */
	@TableField("job_range")
	private String jobRange;

	/**
	 * 建造师人员明细
	 */
	@TableField("architect_detail")
	private String architectDetail;

	/**
	 * 职称人员明细
	 */
	@TableField("job_detail")
	private String jobDetail;

	/**
	 * 中级工人员明细
	 */
	@TableField("middle_detail")
	private String middleDetail;

	/**
	 * 技术负责人人员明细
	 */
	@TableField("tech_lead_detail")
	private String techLeadDetail;
	
	/**
	 * 建造师一级人数
	 */
	private Integer architectl1;

	/**
	 * 建造师二级人数
	 */
	private Integer architectl2;

	/**
	 * 资质类型名称
	 */
	@TableField(exist = false)
	private String buildQualName;

	/**
	 * 等级名称
	 */
	@TableField(exist = false)
	private String gradeName;

	/**
	 * 资质分类名称
	 */
	@TableField(exist = false)
	private String qualTypeName;

	/**
	 * 状态 0-禁用 1-启用
	 */
	private Integer state;

	/**
	 * 资质类别
	 */
	@TableField("qual_flag")
	private Integer qualFlag;

	/**
	 * 资质类别名称
	 */
	@TableField(exist = false)
	private String qualFlagName;

	/**
	 * 建造师专业明细id
	 */
	@TableField(exist = false)
	private List<Integer> architectlSubIdList;

	/**
	 * 职称人员专业明细id
	 */
	@TableField(exist = false)
	private List<Integer> jobSubIdList;

	/**
	 * 建造师专业明细list
	 */
	@TableField(exist = false)
	private List<BuildQualSubEntity> architectlSubList;

	/**
	 * 职称人员专业明细list
	 */
	@TableField(exist = false)
	private List<BuildQualSubEntity> jobSubList;

}
